//
//  User.m
//  中介者模式
//
//  Created by flannery on 2018/12/19.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "User.h"
#import "ChatRoom.h"

@implementation User
- (instancetype)initWithName:(NSString *)name{
    if(self = [super init]) {
        self.name = name;
    }
    return self;
}

- (void)sendMessage:(NSString *)message{
    [ChatRoom showMessage:message user:self];
}
@end
